package com.choosefine.springboot.restTemplate

class test {
//    test() {
//        RestTemplate restTemplate = new RestTemplate();
//        ObjectMapper mapper = new ObjectMapper();
//        def url = "http://192.168.59.2/shopping/order?merchandiseType=1"
//        MyMessage<Page> message = restTemplate.getForObject(url, MyMessage.class, new HashMap());
//        println(mapper.writeValueAsString(message))
//
//        ParameterizedTypeReference<ReturnMessage<Page>> parameterizedTypeReference = new ResolvableType.SyntheticParameterizedType<ReturnMessage<Page>>();
//        ResponseEntity<ReturnMessage<Page>> exchange = restTemplate.exchange(url, HttpMethod.GET, null, parameterizedTypeReference, "");
//        ReturnMessage<Page> returnMsg = exchange.getBody();
//        Page userDto = returnMsg.getData();
//        println(mapper.writeValueAsString(userDto));
//    }
}